# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=perl-file-mimeinfo
pkgver=0.30
pkgrel=2
pkgdesc='Determine file type, includes mimeopen and mimetype'
arch=('any')
url="https://metacpan.org/release/File-MimeInfo"
license=('GPL' 'PerlArtistic')
depends=('perl-encode-locale' 'perl-file-basedir' 'perl-file-desktopentry' 'shared-mime-info')
checkdepends=('perl-test-pod' 'perl-test-pod-coverage')
options=('!emptydirs')
source=(https://cpan.metacpan.org/authors/id/M/MI/MICHIELB/File-MimeInfo-$pkgver.tar.gz)
sha512sums=('44030d2e2be66cb67d4329f8f308bf114014c511fe965979600157d62deffd5c2f05fdf883cb02d98f00d5d0b77c56e252cd377a398461ec421fe7491cd544ec')

build() {
  cd File-MimeInfo-$pkgver
  perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
  cd File-MimeInfo-$pkgver
  make test
}

package() {
  cd File-MimeInfo-$pkgver
  make DESTDIR="${pkgdir}" install
}
